#ifndef _NetworkTools_H_
#define _NetworkTools_H_

#include <vector>

#include <string>

#include "network.h"

#include "settings.h"

#include "http.h"

class NetworkTools{
	public:
		NetworkTools(Settings* ptrSettings);
		~NetworkTools();
		
		bool Connect();
		
		//return true if found
		bool CheckPortiiUpdate(int *version);
		
		//return true on success
		bool UpdatePortii();
		
		//return list of levels on the network for download
		std::vector<std::string> GetNetworkLevels();
		
		//download network level, return true on success
		bool DownloadNetworkLevel(std::string lvlname);
		
		//return true on success
		bool PostLevelToNetwork(std::string filename);
		
		/* TODO High Score Stuff
		GetNetworkHighScores();
		PostHighScore();
		*/
	private:
		bool GetFile(std::string filename, u8 **data, u32* size);
	
		Settings* _ptrSettings;
		
		Http* http;
};

#endif //_NetworkTools_H_